package com.qbw.app.model;

import androidx.databinding.Bindable;
import android.text.TextUtils;

import com.qbw.app.BR;

import java.io.Serializable;

/**
 * @author QBW
 * @date 2019-09-22
 */
public class UserInfo extends BaseModel implements Serializable {

    private String account;
    private int countriesId;
    private long createDate;
    private String currentVehicleCode;
    private String email;
    private int id;
    private int languageId;
    private String phone;
    private String telCode;
    private long updateDate;
    private String userCode;
    private String userImgPath;
    private String userNick;
    private int userState;
    private String userImagePathFull;

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public int getCountriesId() {
        return countriesId;
    }

    public void setCountriesId(int countriesId) {
        this.countriesId = countriesId;
    }

    public long getCreateDate() {
        return createDate;
    }

    public void setCreateDate(long createDate) {
        this.createDate = createDate;
    }

    public String getCurrentVehicleCode() {
        return currentVehicleCode;
    }

    public void setCurrentVehicleCode(String currentVehicleCode) {
        this.currentVehicleCode = currentVehicleCode;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getLanguageId() {
        return languageId;
    }

    public void setLanguageId(int languageId) {
        this.languageId = languageId;
    }

    @Bindable
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Bindable
    public String getTelCode() {
        return telCode;
    }

    public void setTelCode(String telCode) {
        this.telCode = telCode;
    }

    public long getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(long updateDate) {
        this.updateDate = updateDate;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    @Bindable
    public String getUserImgPath() {
        return userImgPath;
    }

    public void setUserImgPath(String userImgPath) {
        this.userImgPath = userImgPath;
        notifyPropertyChanged(BR.userImgPath);
    }

    @Bindable
    public String getUserNick() {
        return userNick;
    }

    public void setUserNick(String userNick) {
        this.userNick = userNick;
    }

    public int getUserState() {
        return userState;
    }

    public void setUserState(int userState) {
        this.userState = userState;
    }

    @Bindable
    public String getUserImagePathFull() {
        if (TextUtils.isEmpty(userImagePathFull)) {
            userImagePathFull = userImgPath;
        }
        return userImagePathFull;
    }

    public void setUserImagePathFull(String userImagePathFull) {
        this.userImagePathFull = userImagePathFull;
        notifyPropertyChanged(BR.userImagePathFull);
    }

    public static class Response extends BaseResponse<UserInfo> {}
}
